#include "TileWalker.h"

TileWalker::TileWalker(void)
{
}

TileWalker::~TileWalker(void)
{
}
//							y    x
//usage: from position POS[col][row] x = row pos, y = col pos
void TileWalker::Move(sf::Vector2i& fromPos, IsoDirection dir)
{
	switch (dir) {
		case ISO_NORTH: fromPos.x--; fromPos.y--; break;
		case ISO_SOUTH: fromPos.x++; fromPos.y++; break;
		case ISO_WEST:  fromPos.y--; fromPos.x++; break;
		case ISO_EAST:  fromPos.y++; fromPos.x--; break;
		case ISO_NORTHEAST: fromPos.x--; break;
		case ISO_NORTHWEST: fromPos.y--; break;
		case ISO_SOUTHEAST: fromPos.y++; break;
		case ISO_SOUTHWEST: fromPos.x++; break;
		default: break;
	}
}